package com.ruoyi.pos.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pos.mapper.RejectItemMapper;
import com.ruoyi.pos.domain.RejectItem;
import com.ruoyi.pos.service.IRejectItemService;

/**
 * 退货Service业务层处理
 * 
 * @author wzh
 * @date 2021-05-20
 */
@Service
public class RejectItemServiceImpl implements IRejectItemService 
{
    @Autowired
    private RejectItemMapper rejectItemMapper;

    /**
     * 查询退货
     * 
     * @param id 退货ID
     * @return 退货
     */
    @Override
    public RejectItem selectRejectItemById(Long id)
    {
        return rejectItemMapper.selectRejectItemById(id);
    }

    /**
     * 查询退货列表
     * 
     * @param rejectItem 退货
     * @return 退货
     */
    @Override
    public List<RejectItem> selectRejectItemList(RejectItem rejectItem)
    {
        return rejectItemMapper.selectRejectItemList(rejectItem);
    }

    /**
     * 新增退货
     * 
     * @param rejectItem 退货
     * @return 结果
     */
    @Override
    public int insertRejectItem(RejectItem rejectItem)
    {
        return rejectItemMapper.insertRejectItem(rejectItem);
    }

    /**
     * 修改退货
     * 
     * @param rejectItem 退货
     * @return 结果
     */
    @Override
    public int updateRejectItem(RejectItem rejectItem)
    {
        return rejectItemMapper.updateRejectItem(rejectItem);
    }

    /**
     * 批量删除退货
     * 
     * @param ids 需要删除的退货ID
     * @return 结果
     */
    @Override
    public int deleteRejectItemByIds(Long[] ids)
    {
        return rejectItemMapper.deleteRejectItemByIds(ids);
    }

    /**
     * 删除退货信息
     * 
     * @param id 退货ID
     * @return 结果
     */
    @Override
    public int deleteRejectItemById(Long id)
    {
        return rejectItemMapper.deleteRejectItemById(id);
    }
}
